package com.thinkgem.jeesite.cn.yy.utils;

import java.io.Serializable;

/**
 * 分页工具类
 * Created by Administrator on 2017/11/17 0017.
 * yzw
 */
public class Paging implements Serializable {
    //某一id
    private int temp;
    //某一String类型的id;
    private String id;
    //从第几条开始
    private int firstPage;
    //取几条
    private int lastPage;
    //第几页
    private int currentPage=1;
    //总记录数
    private int count;
    //总页数
    private int countPage;

    public Paging(String id,int firstPage, int lastPage, int count){
        this.id = id;
        this.firstPage = firstPage;
        this.lastPage = lastPage;
        this.count = count;
        this.countPage=this.count%this.lastPage==0?this.count/this.lastPage:this.count/this.lastPage+1;

    }
    public int getCountPage() {
        return countPage;
    }
    public Paging(int csid, int firstPage, int lastPage, int count) {
        this.temp = csid;
        this.firstPage = firstPage;
        this.lastPage = lastPage;
        this.count = count;
        this.countPage=this.count%this.lastPage==0?this.count/this.lastPage:this.count/this.lastPage+1;
    }
    public int getCurrentPage() {
        return currentPage;
    }
    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }
    public Paging(){}
    public Paging(int firstPage, int lastPage, int count) {
        this.count=count;
        this.firstPage = firstPage;
        this.lastPage = lastPage;
        this.countPage=this.count%this.lastPage==0?this.count/this.lastPage:this.count/this.lastPage+1;
    }
    public int getCount() {
        return count;
    }
    public void setCount(int count) {
        this.count = count;
    }
    public int getTemp() {
        return temp;
    }
    public void setTemp(int temp) {
        this.temp = temp;
    }
    public void setCountPage(int countPage) {
        this.countPage = countPage;
    }
    public int getFirstPage() {
        return firstPage;
    }
    public void setFirstPage(int firstPage) {
        this.firstPage = firstPage;
    }
    public int getLastPage() {
        return lastPage;
    }
    public void setLastPage(int lastPage) {
        this.lastPage = lastPage;
    }

}
